const fs = require('fs')

module.exports = () => {
    return new Promise((reslove, reject) => {
        fs.readFile('./database/comments.json', 'utf-8', (err, commentsStr) => {
            const comments = JSON.parse(commentsStr)
            let li = ``
            comments.comments.forEach(el => {
                li += `<li>${el}</li>\n`
            })
            reslove({content: li})
        })
    })
}